<template>
  <div class="app"></div>
</template>

<script>
import axios from 'axios'

export default {
  components: {},
  data() {
    return {}
  },
  created() {
    this.getData()
    this.getCartData()
    this.getBookData()
  },
  methods: {
    async getData() {
      const res = await axios.get('/api/list')
      console.log(res, 'res')
    },
    async getCartData() {
      const res = await axios.get('/api/cart')
      console.log(res, '购物车')
    },
    async getBookData() {
      const res = await axios.get('/api/book')
      console.log(res, 'book')
    },
  },
}
</script>

<style lang="scss">
.movie-header {
  display: flex;
  span {
    padding: 5px 10px;
    margin: 5px;
    background: lightcoral;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .active {
    background: red;
    color: gold;
  }
}
</style>
